package org.jeecg.modules.kuner.realnameauthbase.mapper;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.jeecg.modules.kuner.realnameauthbase.entity.KrRealNameAuthBase;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

/**
 * @Description: 实名认证
 * @Author: jeecg-boot
 * @Date: 2025-02-17
 * @Version: V1.0
 */
public interface KrRealNameAuthBaseMapper extends BaseMapper<KrRealNameAuthBase> {

    /**
     * 查询用户是否审核过
     *
     * @param userId 用户ID
     * @return 查询结果
     */
    @Select("select * from kr_real_name_auth_base where user_id=#{userId} and judge_status='PASS' or judge_status='NOT' order by create_time desc limit 1")
    KrRealNameAuthBase selectPassAuthByUserId(String userId);
}
